<%- include header.ejs%>

<div style="margin-top: 20px;padding: 25px">
    <div style="font-size: 18px;color: #717171;margin-left: 5%"><%= __('mycenter').homepage%></div>
    <div style="margin-top:30px;float:left;margin-left: 5%;width: 10%">
        <img class="img-rounded" src="<%- user.headSrc%>" style="width:112px;height: 112px">
        <div style="margin-top:30px;font-size: 12px;text-align:center;line-height: 30px;width: 100%;height: 30px;background-color: #d77a03;">
            <a href="/editMyData" style="color: white;text-decoration: none;"><b><%= __('mycenter').editMyData%></b></a>
        </div>
    </div>
    <div style="margin-top:30px;float:left;width: 30%;margin-left: 20px">
        <span style="font-size: large"><%= __('partnerCenter').username %>：<%- user.username%></span><br>
        <span style="font-size: 18px;line-height: 30px"><%= __('partnerCenter').nickname %>：<%- user.nickname%></span><br>
        <span style="font-size: 18px"><%= __('partnerCenter').gender %>：<% if(user.gender==1){%><%= __('partnerCenter').male %><% }else{%><%= __('partnerCenter').woman %><% } %></span><br>
        <span style="font-size: 18px;line-height: 30px"><%= __('partnerCenter').age %>：<%- user.age%></span><br>
        <span style="font-size: 18px;line-height: 20px"><%= __('partnerCenter').m_language %>：<font style="color: #ff7c07"><%- user.language%></font></span><br>
        <span style="font-size: 18px;line-height: 25px"><%= __('partnerCenter').learn_language %>：<font style="color:#1ad700;"><%- user.studylanguage%></font></span><br>
        <span style="font-size: 18px;line-height: 22px"><%= __('partnerCenter').addr %>：<%- user.nowcity%></span><br>
        <span style="font-size: 18px;line-height: 22px"><%= __('editMyData').wechat %>：<%- user.wechat%></span><br>
        <span style="font-size: 18px;line-height: 22px"><%= __('partnerCenter').interests %>：<%- user.describe%></span><br>
    </div>
    <div style="float: left;margin-left: 13%;width: 35%;position: relative;">
        <div id='calendar' style="margin:0px;width: 90%"></div>
        <div style="position: absolute;top:50%;right:38%;z-index:10;font-size: 12px;text-align:center;line-height: 30px;width: 30%;height: 30px;background-color: #d77a03;">
            <a href="/mySchedule" data-toggle="modal" style="color: white;text-decoration: none;" target="userContent"><b><%= __('mycenter').editSchedule%></b></a>
        </div>
    </div>

    <div style="clear: both"></div>
    <div style="margin:80px">
    </div>
    <div style="height:700px">
        <div style="height: 100%;float: left;width: 20%;border:2px dotted #cac9c4;border-right: 0px;border-left: 0px">
            <div style="text-align: center">
                <h3 style="color: #afaea7"><%= __('mycenter').partner%></h3>
                <h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/orderList" target="userContent" style="color: #d77a03"><%= __('mycenter').s_intive%></a></b></h4>
                <h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/myOrderList" target="userContent" style="color: #d77a03"><%= __('mycenter').r_intive%></a></b></h4>
                <h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/meetList" target="userContent" style="color: #d77a03"><%= __('mycenter').s_partner%></a></b></h4>

            </div>
            <hr style="border: none;border-top: 2px dotted #cac9c4">
            <!--<div style="text-align: center">-->
                <!--<h3 style="color: #afaea7">我的语伴</h3>-->
                <!--<h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/myApply" target="userContent" style="color: #d77a03">发出的邀请</a></b></h4>-->
                <!--<h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/applyPartner" target="userContent" style="color: #d77a03">收到的邀请</a></b></h4>-->
            <!--</div>-->
            <!--<hr style="border: none;border-top: 2px dotted #cac9c4">-->
            <div style="text-align: center">
                <h3 style="color: #afaea7"><%= __('mycenter').active%></h3>
                <!--<h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/myLoveActive" target="userContent" style="color: #d77a03"><%= __('partnerCenter').l_active %></a></b></h4>-->
                <h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/myActive" target="userContent" style="color: #d77a03"><%= __('partnerCenter').j_active %></a></b></h4>
            </div>
            <hr style="border: none;border-top: 2px dotted #cac9c4">
            <div style="text-align: center">
                <h3 style="color: #afaea7"><%= __('mycenter').post%></h3>
                <h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/myPost" target="userContent" style="color: #d77a03"><%= __('partnerCenter').s_post %></a></b></h4>
                <h4 style="margin-top: 20px"><b style="color: #d77a03">&nbsp;&nbsp;&nbsp;&nbsp;<a href="/myReplyPost" target="userContent" style="color: #d77a03"><%= __('partnerCenter').j_post %></a></b></h4>
            </div>
        </div>

        <div style="height: 100%;float: left;width: 78%;border:2px dotted #cccbc6;border-right: 0px;">
            <iframe name="userContent" style="width: 100%;height: 100%;border: 0" src="/mySchedule"></iframe>
        </div>

    </div>

    <div style="margin-left: 10%">
        <h4 style="margin-left: 50px;margin-top: 100px;color: #5b5b5b"><b><%= __('partnerCenter').r_partner %></b></h4>
        <div style="margin-left: 10%">
            <% recommendUsers.forEach(function(recommendUser,index){%>
            <div style="text-align: center;width: 7%;float: left;margin-left: 1%">
                <img class="img-rounded" src="<%-recommendUser.headSrc%>" style="margin-left: 5px;width:53px;height: 53px;">
                <span style="margin-left: 5px;display: block"><a href="/partnerCenter?username=<%- recommendUser.username %>"><%- recommendUser.nickname %></a></span>
            </div>
            <%})%>
        </div>

        <div style="clear: both"></div>
    </div>


</div>
<%- include footer.ejs%>
<script>



    $(function(){
        var currentLangCode = '<%= __('partnerCenter').language %>';

        // build the language selector's options
        $.each($.fullCalendar.langs, function(langCode) {
            $('#lang-selector').append(
                    $('<option/>')
                            .attr('value', langCode)
                            .prop('selected', langCode == currentLangCode)
                            .text(langCode)
            );
        });

        // rerender the calendar when the selected option changes
        $('#lang-selector').on('change', function() {
            if (this.value) {
                currentLangCode = this.value;
                $('#calendar').fullCalendar('destroy');
                renderCalendar();
            }
        });

        function renderCalendar() {
            $('#calendar').fullCalendar({
                defaultView:'agendaWeek',
                //添加
//                theme: false,//使用jquery-ui来生成界面
//                editable: true,
                allDaySlot : false,
//                defaultDate: '2014-09-12',
                lang: currentLangCode,
//                buttonIcons: false, // show the prev/next text
//                weekNumbers: true,
//                editable: true,
//                eventLimit: true ,// allow "more" link when too many events
                //
                header: {
                    left: '',
                    center: '',
                    right: ''
                },
                aspectRatio: 1.6,
                eventTextColor:'#000000'        //字体颜色
            });
        }

        renderCalendar();

    })


</script>

